<?php
namespace app\serverqrcode\service\qrcode;
use app\manage\service\ApiBase;
/**
 * Created by PhpStorm.
 * User: 97606
 * Date: 2017/7/19
 * Time: 15:13
 */
class QrCode extends ApiBase
{
    protected $qrCodeLogic = 'app\serverqrcode\logic\QrCode';
    protected $qrCodeValidate = 'app\serverqrcode\validate\QrCode';

    //生成二维码 可设置大小
    public function createQrCode()
    {
        $data = $this->haveIssetReceiveData(["token"=>" ", "appkey"=>" ", "type"=>" ", "code_id"=>" ", "url"=>" ", "size"=>"6"]);
        return $this->oneStepRun($data,'serverqrcode/qrcode/ApiQrCode/createQrCode','createQrCode');
    }

    //获取二维码
    public function gainQrCode()
    {
        $data = $this->haveIssetReceiveData(["token"=>" ", "appkey"=>" ", "type"=>" ", "code_id"=>" "]);
        return $this->oneStepRun($data,'serverqrcode/qrcode/ApiQrCode/gainQrCode','gainQrCode');
    }
}